package com.wondertek.poms.dao.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.wondertek.poms.common.utils.validate.GroupType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.io.Serializable;

/**
 * <p><b>PcProductPermissionVo Description:</b> PcProductPermissionVo类  对应 pc_product_permission-产品权限表 表</p>
 *
 * @author 窦再兴
 * <p><b>DATE</b> 2019-08-12 11:20:52</p>
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PcProductPermissionVo implements Serializable {

    private static final long serialVersionUID = 7556798273475899814L;
    /**
     * <b>Fields</b> id : 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = {Default.class})
    private Long id;

    /**
     * <b>Fields</b> fsPrdId : 一二级产品ID 外键
     */
    @NotNull(message = "一二级产品ID 外键不能为空", groups = {Default.class})
    private Long fsPrdId;

    /**
     * <b>Fields</b> prdLevel : 产品级别 1一级 2二级
     */
    @Range(message = "产品级别 1一级 2二级的范围是[0-9]", min = 0, max = 9, groups = {Default.class})
    private Integer prdLevel;

    /**
     * <b>Fields</b> prdType : 类型 1用户 2角色
     */
    @Range(message = "类型 1用户 2角色的范围是[0-9]", min = 0, max = 9, groups = {Default.class})
    private Integer prdType;

    /**
     * <b>Fields</b> ugid : 用户群组ID
     */
//	@NotNull(message = "用户群组ID不能为空", groups = {Default.class})
    private Long ugid;

    @NotNull(message = "用户或群组ID不能为空", groups = {Default.class})
    private Long userOrGroupId;

    /**
     * <b>Fields</b> ugname : 用户群组名称
     */
    @NotBlank(message = "用户群组名称不能为空", groups = {Default.class})
    @Length(message = "用户群组名称长度不能超过255个字节", max = 255, groups = {Default.class, GroupType.Update.class})
    private String ugname;

    /**
     * <b>Fields</b> createdBy : 创建人
     */
    @NotBlank(message = "创建人不能为空", groups = {Default.class})
    @Length(message = "创建人长度不能超过64个字节", max = 64, groups = {Default.class, GroupType.Update.class})
    private String createdBy;

    /**
     * <b>Fields</b> createdTime : 创建时间 YYYY-MM-DD HH24:MI:SS
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.time.LocalDateTime createdTime;

    /**
     * <b>Fields</b> updatedBy : 更新人
     */
    @NotBlank(message = "更新人不能为空", groups = {Default.class})
    @Length(message = "更新人长度不能超过64个字节", max = 64, groups = {Default.class, GroupType.Update.class})
    private String updatedBy;

    /**
     * <b>Fields</b> updatedTime : 更新时间 YYYY-MM-DD HH24:MI:SS
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.time.LocalDateTime updatedTime;

    /**
     * <b>Fields</b> remarks : 备注
     */
    @NotBlank(message = "备注不能为空", groups = {Default.class})
    @Length(message = "备注长度不能超过512个字节", max = 512, groups = {Default.class, GroupType.Update.class})
    private String remarks;

    /**
     * <b>Fields</b> deleted : 是否删除 1是0否
     */
    @Range(message = "是否删除 1是0否的范围是[0-9]", min = 0, max = 9, groups = {Default.class})
    private Integer deleted;
}